
////////////////////////////////////////////////////////////////////////////////
** Do-file for Substantive Representation , Women's Health, and Regime Type
** Authors: Valeryia Mechkova (valeriya.mechkova@gu.se) and Amanda B. Edgell (abedgell@ua.edu)
** Journal: Comparative Political Studies
** Stata Version 16.1
////////////////////////////////////////////////////////////////////////////////



* replication dataset
use "dataset.dta", clear

* set scheme
set scheme virdis




////////////////////////////////////////////////////////////////////////////////

								** MAIN TEXT **
 
////////////////////////////////////////////////////////////////////////////////


********************************************************************************

** Table 1 - Health Spending: Government health expenditure (% GDP)
 
********************************************************************************

eststo clear
eststo: xtreg wdi_dgovhexp L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.quota L.e_gdppc L.lpop L.v2pehealth, fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.quota L.e_gdppc L.lpop L.v2pehealth, fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.autocracy#L.c.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth, ///
	fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.atype#c.L.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth, ///
	fe cluster(country_id)

esttab _all, replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress  ///
 order(L.v2lgfemleg 1L.autocracy 1L.atype 2L.atype ///
	1L.autocracy#cL.v2lgfemleg  ///
	1L.atype#cL.v2lgfemleg  ///
	2L.atype#cL.v2lgfemleg  ///
	1L.quota 1L.femex ///
	L.e_gdppc L.lpop L.v2pehealth _cons) ///
 drop(0bL.autocracy* 0bL.atype* 0bL.quota 0bL.femex) ///
 coeflabel(1L.autocracy "Autocracy" ///
	2L.atype "Electoral autocracy" ///
	1L.atype "Closed autocracy" ///
	1L.autocracy#cL.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L.atype#cL.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1L.atype#cL.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1L.femex "Woman executive" ///
	L.v2lgfemleg "Women legislators (\%)" ///
	1L.quota "Gender quotas" ///
	L.e_gdppc "GDP (per capita)" ///
	L.lpop "Population (ln)" ///
	L.v2pehealth "Health equality" ///
	_cons "Constant")
	
	
/* Uncomment if you want to reproduce in LaTeX	
esttab _all using "fe_spend.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(L.v2lgfemleg 1L.autocracy 1L.atype 2L.atype ///
	1L.autocracy#cL.v2lgfemleg  ///
	1L.atype#cL.v2lgfemleg  ///
	2L.atype#cL.v2lgfemleg  ///
	1L.quota 1L.femex ///
	L.e_gdppc L.lpop L.v2pehealth _cons) ///
 drop(0bL.autocracy* 0bL.atype* 0bL.quota 0bL.femex) ///
 coeflabel(1L.autocracy "Autocracy" ///
	2L.atype "Electoral autocracy" ///
	1L.atype "Closed autocracy" ///
	1L.autocracy#cL.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L.atype#cL.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1L.atype#cL.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1L.femex "Woman executive" ///
	L.v2lgfemleg "Women legislators (\%)" ///
	1L.quota "Gender quotas" ///
	L.e_gdppc "GDP (per capita)" ///
	L.lpop "Population (ln)" ///
	L.v2pehealth "Health equality" ///
	_cons "Constant")
*/
 
********************************************************************************

** Figure 1 - Marginal effects of women's representation on healthcare spending
	* by regime type

********************************************************************************
	 
	
	
* average marginal effects by regime type
est restore est4
margins iL.atype, dydx(L.v2lgfemleg) post
	
marginsplot, level(90) recast(scatter) ///
		plotopts(mcolor(white) mlcolor(black) m(O)) ///
		xscale(r(-0.5 2.5)) ylab(,labsize(large)) ///
		xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
		xti("") yti("", size(large)) ///
		yline(0, lcolor(black)) ti("") xsize(5) ysize(3) ///
		ciopts(lcolor(black) lwidth(medium))
		
* Uncomment if you wish to export the graph		
* graph export "fespendmer.pdf", replace
		 

** differences in predicted values by regime type
est restore est4 
margins, dydx(iL.atype) at(L.v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)", size(medium)) ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(lcolor(black) lwidth(medium)) level(90) ///
			ylab(-4(2)4,labsize(large)) xlab(0(10)50,labsize(large)) ///
				xsize(7) ysize(4)
				
* Uncomment if you wish to export the graph					
* graph export "fespenddiffr.pdf", replace
			
	
********************************************************************************

** Table 2 - Women's representation and LRMD by regime type

********************************************************************************

eststo clear
eststo: xtreg F5.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F5.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.autocracy#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
eststo: xtreg F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
	
	
esttab _all,   ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress  ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")	
	
	
/* Uncomment to export LaTeX table 
	
esttab _all using "fe_mat_mort5.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")

	*/
	
	
********************************************************************************

** Figure 2 - Marginal effects of women's representation on LRMD (logged) 
	* by regime type

********************************************************************************
	
	
** restore Model 4
est restore est4

* average marginal effects by regime type
est restore est4
margins i.atype, dydx(v2lgfemleg) post coeflegend
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:2.atype] 
	test _b[v2lgfemleg:1.atype] = _b[v2lgfemleg:2.atype]
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:1.atype] 
	
marginsplot, level(90) recast(scatter) ///
	plotopts(mcolor(white) mlcolor(black) m(O)) ///
	xscale(r(-0.5 2.5)) ylab(-0.02(0.01)0.02, labsize(large)) ///
	xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
	xti("") yti("") ///
	yline(0, lcolor(black)) ti("") xsize(5) ysize(3) graphregion(color(white)) ///
	ciopts(lcolor(black) lwidth(medium))
	
	
* Uncomment to export graph	
* graph export "mat_mort5_ave.pdf", replace

** plot predicted marginal effects and 90% CIs 
est restore est4
margins, dydx(i.atype) at(v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(color(black) lwidth(medium)) level(90) ///
			ylab(0.8(0.2)-0.8,labsize(medium)) ///
			xlab(0(10)50,labsize(medium)) ///
				xsize(7) ysize(4) graphregion(color(white))
			
* Uncomment to export graph
* graph export "mar_mort5_marg.pdf", replace	


********************************************************************************

** Figure 3 - Summary of results for robustness checks

********************************************************************************
	

*** Spending Summary
eststo clear
** Main model - WHO
eststo: xtreg wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.atype#c.L.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth, ///
	fe cluster(country_id)
** Two-way FE
eststo: xtreg wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.atype#c.L.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth i.year, ///
	fe cluster(country_id)
** PW PCSE AR1
eststo: xtpcse wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.atype#c.L.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth, ///
	c(ar1) pairwise rhotype(tscorr)
** IHME Estimates
eststo: xtreg ghes_per_gdp_mean L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.atype#c.L.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth, ///
	fe cluster(country_id)
** Corruption Control
eststo: xtreg wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.atype#c.L.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth L.v2x_corr, ///
	fe cluster(country_id)
	
local estlist "est1 est2 est3 est4 est5"
foreach est of local estlist {
	est restore `est'
	eststo: margins iL.atype, dydx(L.v2lgfemleg) level(90) post
}

coefplot (est6, aseq("Country FE")) ///
	(est7, aseq("Twoway FE")) ///
	(est8, aseq("PCSE")) ///
	(est9, aseq("IHME")) ///
	(est10, aseq("Corruption")),  xline(0, lcolor(black)) level(90) ///
	mcolor(white) mlcolor(black) m(O) ///
			ciopts(lcolor(black) lwidth(medium))  ///
			swap legend(off) label ///
			eqlabels("{bf: Democracy}" ///
					 "{bf: Closed autocracy}" ///
					 "{bf: Electoral autocracy}", asheading) ///
	xsize(3) ysize(3)
	
* Uncomment to export figure	
* graph export "summary1.pdf", replace
 					 
*** Maternal mortality
eststo clear					 
** WHO data FE
eststo: xtreg F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
** Two-way FE
eststo: xtreg F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth i.year, fe cluster(country_id)
** 	PCSE
eststo: xtpcse F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth , ///
	c(ar1) pairwise rhotype(tscorr)
** Ward et al.
eststo: xtreg F5.lnmatltr ghes_per_gdp_mean i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
** Corruption
eststo: xtreg F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth v2x_corr, fe cluster(country_id)

local estlist "est1 est2 est3 est4 est5"
foreach est of local estlist {
	est restore `est'
	eststo: margins i.atype, dydx(v2lgfemleg) level(90) post
}

coefplot (est6, aseq("Country FE")) ///
	(est7, aseq("Twoway FE")) ///
	(est8, aseq("PCSE")) ///
	(est9, aseq("GMHM")) ///
	(est10, aseq("Corruption")),  xline(0, lcolor(black)) level(90) ///
	mcolor(white) mlcolor(black) m(O) ///
			ciopts(lcolor(black) lwidth(medium))  ///
			swap legend(off) label ///
			eqlabels("{bf: Democracy}" ///
					 "{bf: Closed autocracy}" ///
					 "{bf: Electoral autocracy}", asheading) ///
	xsize(3) ysize(3)
	
* Uncomment to export figure
* graph export "summary2.pdf", replace
 					 

////////////////////////////////////////////////////////////////////////////////

								** APPENDIX **
 
////////////////////////////////////////////////////////////////////////////////
	
********************************************************************************

** Table A1: Summary Statistics 

********************************************************************************

	** find the 169 countries included in the models
eststo: xtreg wdi_dgovhexp L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.quota L.e_gdppc L.lpop L.v2pehealth, fe cluster(country_id)
bys country_id: egen tag = max(e(sample))

	* summary statistics for 2000-2018 for the countries included in the analysis
estpost tabstat  wdi_dgovhexp mat_mort v2lgfemleg autocracy quota femex  ///
	 e_gdppc lpop v2pehealth if year>=2000 & year<=2018 & tag==1, ///
	c(stat) stat(N mean sd min max)
ereturn list

esttab ., ///
 cells("count mean(fmt(%13.2f)) sd(fmt(%13.2f)) min max") nonumber ///
  nomtitle nonote noobs label collabels("Obs" "Mean" "SD" "Min" "Max")
  
  /* uncomment to export LaTex table
 esttab . using "summary.tex", replace ////
 cells("count mean(fmt(%13.2f)) sd(fmt(%13.2f)) min(fmt(%13.2f)) max(fmt(%13.2f))") nonumber ///
  nomtitle nonote noobs label  booktabs f ///
  collabels("Obs" "Mean" "SD" "Min" "Max") alignment(D{.}{.}{-1})
  */
  

********************************************************************************

** Figure A1: Histogram of government health expenditures

********************************************************************************

hist wdi_dgovhexp, fcolor(white) lcolor(black) lwidth(medthin) ///
	xsize(7) ysize(4)
	
* Uncomment to export figure	
* graph export "hist_wdi_chexppgdp.pdf", replace
 
********************************************************************************

** Figure A2: Violin plots for Government Expenditures

********************************************************************************

gen symbol = "–"
vioplot wdi_dgovhexp, over(atype) ///
	bar(fcolor(white) lcolor(black) lwidth(medium)) ///
	line(lcolor(black) lwidth(medium)) ///
	median(msymbol(none) mlab(symbol) mlabcolor(black) mlabpos(0)) ///
	dens(fcolor(white) lcolor(gs5) lwidth(medthin))  xsize(7) ysize(4)
	
* Uncomment to export figure 	
* graph export "Figures/vioplot.pdf", replace



********************************************************************************

** Figure A3: Annual changes in government expenditures

********************************************************************************

/// START --> 

preserve 
gen change = D.wdi_dgovhexp 
gen abschange = abs(change)
sum change 
sum abschange 
gen changep = change>0 
replace changep = . if change==.
gen changen = change<0
replace changen = . if change==. 
collapse (mean) change abschange changep changen wdi_dgovhexp, by(year)
replace changen = -100*changen
replace changep = changep*100
drop if year<2000 | year>2018
twoway bar changen changep year, ylab(0 "0" 25 "25" 50 "50" 75 "75" 100 "100" ///
	-25 "25" -50 "50" -75 "75" -100 "100") ///
	yline(0, lcolor(black)) fcolor(white white) lcolor(black black) ///
	legend(off) ///
	ymlab( 50 "Positive (%)"  -50  "Negative (%)", angle(vertical) ///
		tlength(10) labsize(medium) tlcolor(none))  xsize(7) ysize(4) ///
		name(spendchp, replace)

* Uncomment to export figure
* graph export "spendchp.pdf", replace

twoway line change abschange year, lcolor(black gs5) lpatt(solid solid) ///
			lwidth(medium medium) ///
			text(0.1 2009.5 "––" 0.1 2010.1 "Average" ///
				 0.32 2009.5 "––" 0.32 2010 "Average absolute value", place(e)) ///
		yti("Annual change in government health spending") legend(off) ///
		xsize(7) ysize(4) name(spendch, replace)
		
* Uncomment to export figure		
* graph export "spendch.pdf", replace

restore
/// <- END



	
********************************************************************************

** Figure A4: Distribution of LRMD 

********************************************************************************
	
hist wdi_lrmd,fcolor(white) lcolor(black) lwidth(medthin) ///
	xsize(7) ysize(4) xti("")

* uncomment to export figure	
* graph export "hist_wdi_lrmd.pdf", replace

hist mat_mort ,fcolor(white) lcolor(black) lwidth(medthin) ///
	xsize(7) ysize(4) xti("")
	
* uncomment to export figure	
* graph export "hist_mat_mort.pdf", replace

********************************************************************************

** Figure A5:  Table and line graphs of LRMD by region (Figure A4)

********************************************************************************

bys e_regionpol_6C: sum wdi_lrmd
 sort country_id year 

twoway line wdi_lrmd year if year>=2000, connect(L) by(e_regionpol_6C, note("")) ///
	xlab(2000(5)2015) yti("") lcolor(black) xsize(7) ysize(5)
	
* uncomment to export figure	
* graph export "lrmdr.pdf", replace

  
  
********************************************************************************

** Figure A6: Violin plots for LRMD (level and logged) by regime type

********************************************************************************

vioplot wdi_lrmd, over(atype) ///
	bar(fcolor(white) lcolor(black) lwidth(medium)) ///
	line(lcolor(black) lwidth(medium)) ///
	median(msymbol(none) mlab(symbol) mlabcolor(black) mlabpos(0)) ///
	dens(fcolor(white) lcolor(gs5) lwidth(medthin))  xsize(7) ysize(4)
*uncomment to export figure
* graph export "vioplot2.pdf", replace


vioplot mat_mort, over(atype) ///
	bar(fcolor(white) lcolor(black) lwidth(medium)) ///
	line(lcolor(black) lwidth(medium)) ///
	median(msymbol(none) mlab(symbol) mlabcolor(black) mlabpos(0)) ///
	dens(fcolor(white) lcolor(gs5) lwidth(medthin))  xsize(7) ysize(4)
*uncomment to export figure	
* graph export "vioplot3.pdf", replace

	  
********************************************************************************

** Figure A7: Violin plots for women legislators by regime type

********************************************************************************

vioplot v2lgfemleg if tag==1 & year>2000 & year<2019, over(atype) ///
	bar(fcolor(white) lcolor(black) lwidth(medium)) ///
	line(lcolor(black) lwidth(medium)) yti("Women legislators (%)") ///
	median(msymbol(none) mlab(symbol) mlabcolor(black) mlabpos(0)) ///
	dens(fcolor(white) lcolor(gs5) lwidth(medthin))  xsize(7) ysize(4)
* uncomment to export figure
* graph export "vioplot4.pdf", replace



	
********************************************************************************

** Figure A8 - Marginal effect of women’s representation on health spending in democracies and autocracies (one year lag)

********************************************************************************


eststo clear
eststo: xtreg wdi_dgovhexp L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.autocracy#L.c.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth, ///
	fe cluster(country_id)
	
	
** average marginal effects for democracy v. autocracy
margins iL.autocracy, dydx(L.v2lgfemleg) level(90) post
test  _b[L.v2lgfemleg:0bnL.autocracy] =  _b[L.v2lgfemleg:1L.autocracy]

marginsplot, level(90) recast(scatter) ///
		plotopts(mcolor(white) mlcolor(black) m(O)) ///
		xscale(r(-0.5 1.5)) ylab(0.025 0.05 0, labsize(large)) ///
		xlab(0 "Democracy" 1 "Autocracy", labsize(large)) ///
		xti("") yti("", size(large)) ///
		yline(0, lcolor(black)) ti("") xsize(4) ysize(3) ///
		ciopts(lcolor(black) lwidth(medium)) 

* uncomment to export figure
* graph export "fespendme.pdf", replace
			
** predicted difference between democracy and autocracy 
est restore est1
margins, dydx(i.L.autocracy) at(L.v2lgfemleg=(0(10)50)) 
marginsplot, yti("", size(large)) ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///  
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		ciopts(lcolor(black) lwidth(medium))  ///
		level(90) ylab(-1.5(0.5)1.5,labsize(medium)) ///
		legend(off) ///
		xlab(,labsize(medium)) xsize(7) ysize(4) ///
		ti("")
		
* uncomment to export figure		
* graph export "fespenddiff.pdf", replace

	
********************************************************************************

** Figure A9 - Marginal effect of women’s representation on LRMD in democracies and autocracies (five year lag)

********************************************************************************

eststo clear 
eststo: xtreg F5.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.autocracy#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
	
** average marginal effects for democracy v. autocracy
margins i.autocracy, dydx(v2lgfemleg) level(90) post
test  _b[v2lgfemleg:0bn.autocracy] =  _b[v2lgfemleg:1.autocracy]

marginsplot, level(90) recast(scatter) ///
		plotopts(mcolor(white) mlcolor(black) m(O)) ///
		xscale(r(-0.5 1.5)) ylab(-0.015(0.005)0, labsize(large)) ///
		xlab(0 "Democracy" 1 "Autocracy", labsize(large)) ///
		xti("") yti("", size(large)) ///
		yline(0, lcolor(black)) ti("") xsize(4) ysize(3) ///
		ciopts(lcolor(black) lwidth(medium)) 

* uncomment to export figure
* graph export "fematmortme.pdf", replace
			
** predicted difference between democracy and autocracy 
est restore est1
margins, dydx(i.autocracy) at(v2lgfemleg=(0(10)50)) 
marginsplot, yti("", size(large)) ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///  
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		ciopts(lcolor(black) lwidth(medium))  ///
		level(90) ylab(,labsize(medium)) ///
		legend(off) ///
		xlab(,labsize(medium)) xsize(7) ysize(4) ///
		ti("")

* uncomment to export figure
* graph export "Figures/fematmortdiff.pdf", replace



	
********************************************************************************

** Table A2: Government Spending with Two-Way FE
 
********************************************************************************

eststo clear
eststo: xtreg wdi_dgovhexp L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.quota L.e_gdppc L.lpop L.v2pehealth i.year, fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.quota L.e_gdppc L.lpop L.v2pehealth i.year, fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.autocracy#L.c.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth i.year, ///
	fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.atype#c.L.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth i.year, ///
	fe cluster(country_id)

esttab _all,  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress  ///
 order(L.v2lgfemleg 1L.autocracy 1L.atype 2L.atype ///
	1L.autocracy#cL.v2lgfemleg  ///
	1L.atype#cL.v2lgfemleg  ///
	2L.atype#cL.v2lgfemleg  ///
	1L.quota 1L.femex ///
	L.e_gdppc L.lpop L.v2pehealth _cons) ///
 drop(0bL.autocracy* 0bL.atype* 0bL.quota 0bL.femex *.year) ///
 coeflabel(1L.autocracy "Autocracy" ///
	2L.atype "Electoral autocracy" ///
	1L.atype "Closed autocracy" ///
	1L.autocracy#cL.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L.atype#cL.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1L.atype#cL.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1L.femex "Woman executive" ///
	L.v2lgfemleg "Women legislators (\%)" ///
	1L.quota "Gender quotas" ///
	L.e_gdppc "GDP (per capita)" ///
	L.lpop "Population (ln)" ///
	L.v2pehealth "Health equality" ///
	_cons "Constant")
	
	
/* Uncomment to export to LaTeX
	
esttab _all using "fte_spend.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(L.v2lgfemleg 1L.autocracy 1L.atype 2L.atype ///
	1L.autocracy#cL.v2lgfemleg  ///
	1L.atype#cL.v2lgfemleg  ///
	2L.atype#cL.v2lgfemleg  ///
	1L.quota 1L.femex ///
	L.e_gdppc L.lpop L.v2pehealth _cons) ///
 drop(0bL.autocracy* 0bL.atype* 0bL.quota 0bL.femex *.year) ///
 coeflabel(1L.autocracy "Autocracy" ///
	2L.atype "Electoral autocracy" ///
	1L.atype "Closed autocracy" ///
	1L.autocracy#cL.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L.atype#cL.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1L.atype#cL.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1L.femex "Woman executive" ///
	L.v2lgfemleg "Women legislators (\%)" ///
	1L.quota "Gender quotas" ///
	L.e_gdppc "GDP (per capita)" ///
	L.lpop "Population (ln)" ///
	L.v2pehealth "Health equality" ///
	_cons "Constant")
*/ 
			
********************************************************************************

** Figure A10 - Marginal effects on healthcare spending, twoway fe 

********************************************************************************
	 

* average marginal effects by regime type
est restore est4
margins iL.atype, dydx(L.v2lgfemleg) post
	
marginsplot, level(90) recast(scatter) ///
		plotopts(mcolor(white) mlcolor(black) m(O)) ///
		xscale(r(-0.5 2.5)) ylab(,labsize(large)) ///
		xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
		xti("") yti("", size(large)) ///
		yline(0, lcolor(black)) ti("") xsize(5) ysize(3) ///
		ciopts(lcolor(black) lwidth(medium))
		
* Uncomment to export figure
* graph export "ftespendmer.pdf", replace
		 

** differences in predicted values by regime type
est restore est4 
margins, dydx(iL.atype) at(L.v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)", size(medium)) ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(lcolor(black) lwidth(medium)) level(90) ///
			ylab(-4(2)4,labsize(large)) xlab(0(10)50,labsize(large)) ///
				xsize(7) ysize(4)
				
				
* Uncomment to export figure
* graph export "ftespenddiffr.pdf", replace			
			
	
********************************************************************************

** Table A3 - LRMD with Twoway FE

********************************************************************************

eststo clear
eststo: xtreg F5.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth i.year, fe cluster(country_id)
eststo: xtreg F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth i.year, fe cluster(country_id)
eststo: xtreg F5.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.autocracy#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth i.year, fe cluster(country_id)
eststo: xtreg F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth i.year, fe cluster(country_id)
	
	
esttab, ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex *.year) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")
	
/* Uncomment to export to LaTex 	
esttab _all using "fte_mat_mort5.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex *.year) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")	
*/

********************************************************************************

** Figure A11 - Marginal effects on LRMD with two-way fixed effects

********************************************************************************
	
	
** restore Model 4
est restore est4

* average marginal effects by regime type
est restore est4
margins i.atype, dydx(v2lgfemleg) post coeflegend
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:2.atype] 
	test _b[v2lgfemleg:1.atype] = _b[v2lgfemleg:2.atype]
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:1.atype] 
	
marginsplot, level(90) recast(scatter) ///
	plotopts(mcolor(white) mlcolor(black) m(O)) ///
	xscale(r(-0.5 2.5)) ylab(-0.02(0.01)0.02, labsize(large)) ///
	xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
	xti("") yti("") ///
	yline(0, lcolor(black)) ti("") xsize(5) ysize(3) graphregion(color(white)) ///
	ciopts(lcolor(black) lwidth(medium))
	
* uncomment to export figure 	
* graph export "tmat_mort5_ave.pdf", replace

** plot predicted marginal effects and 90% CIs 
est restore est4
margins, dydx(i.atype) at(v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(color(black) lwidth(medium)) level(90) ///
			ylab(0.8(0.2)-0.8,labsize(medium)) ///
			xlab(0(10)50,labsize(medium)) ///
				xsize(7) ysize(4) graphregion(color(white))
			
	
* uncomment to export figure 	
* graph export "tmar_mort5_marg.pdf", replace		
	
	
	
********************************************************************************

** Table A4: Government Spending with Prais-Winsten w/ PCSE
 
********************************************************************************

eststo clear
eststo: xtpcse wdi_dgovhexp L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.quota L.e_gdppc L.lpop L.v2pehealth,  ///
	c(ar1) pairwise rhotype(tscorr)
eststo: xtpcse wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.quota L.e_gdppc L.lpop L.v2pehealth, ///
	c(ar1) pairwise rhotype(tscorr)
eststo: xtpcse wdi_dgovhexp L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.autocracy#L.c.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth, ///
	c(ar1) pairwise rhotype(tscorr)
eststo: xtpcse wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.atype#c.L.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth, ///
	c(ar1) pairwise rhotype(tscorr)

esttab,  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_g Countries") sfmt(0 0 2) ///
 nomtitle collabels(none) compress  ///
 order(L.v2lgfemleg 1L.autocracy 1L.atype 2L.atype ///
	1L.autocracy#cL.v2lgfemleg  ///
	1L.atype#cL.v2lgfemleg  ///
	2L.atype#cL.v2lgfemleg  ///
	1L.quota 1L.femex ///
	L.e_gdppc L.lpop L.v2pehealth _cons) ///
 drop(0bL.autocracy* 0bL.atype* 0bL.quota 0bL.femex) ///
 coeflabel(1L.autocracy "Autocracy" ///
	2L.atype "Electoral autocracy" ///
	1L.atype "Closed autocracy" ///
	1L.autocracy#cL.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L.atype#cL.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1L.atype#cL.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1L.femex "Woman executive" ///
	L.v2lgfemleg "Women legislators (\%)" ///
	1L.quota "Gender quotas" ///
	L.e_gdppc "GDP (per capita)" ///
	L.lpop "Population (ln)" ///
	L.v2pehealth "Health equality" ///
	_cons "Constant")
	
/* Uncomment to export LaTex
esttab _all using "psce_spend.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_g Countries") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(L.v2lgfemleg 1L.autocracy 1L.atype 2L.atype ///
	1L.autocracy#cL.v2lgfemleg  ///
	1L.atype#cL.v2lgfemleg  ///
	2L.atype#cL.v2lgfemleg  ///
	1L.quota 1L.femex ///
	L.e_gdppc L.lpop L.v2pehealth _cons) ///
 drop(0bL.autocracy* 0bL.atype* 0bL.quota 0bL.femex) ///
 coeflabel(1L.autocracy "Autocracy" ///
	2L.atype "Electoral autocracy" ///
	1L.atype "Closed autocracy" ///
	1L.autocracy#cL.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L.atype#cL.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1L.atype#cL.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1L.femex "Woman executive" ///
	L.v2lgfemleg "Women legislators (\%)" ///
	1L.quota "Gender quotas" ///
	L.e_gdppc "GDP (per capita)" ///
	L.lpop "Population (ln)" ///
	L.v2pehealth "Health equality" ///
	_cons "Constant")
*/ 
	
********************************************************************************

** Figure A12 - Marginal effects on healthcare spending, PCSE

********************************************************************************
	 
	
	
* average marginal effects by regime type
est restore est4
margins iL.atype, dydx(L.v2lgfemleg) post
	
marginsplot, level(90) recast(scatter) ///
		plotopts(mcolor(white) mlcolor(black) m(O)) ///
		xscale(r(-0.5 2.5)) ylab(,labsize(large)) ///
		xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
		xti("") yti("", size(large)) ///
		yline(0, lcolor(black)) ti("") xsize(5) ysize(3) ///
		ciopts(lcolor(black) lwidth(medium))
		
* uncomment to export figure		
* graph export "pcsespendmer.pdf", replace
		 

** differences in predicted values by regime type
est restore est4 
margins, dydx(iL.atype) at(L.v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)", size(medium)) ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(lcolor(black) lwidth(medium)) level(90) ///
			ylab(-4(2)4,labsize(large)) xlab(0(10)50,labsize(large)) ///
				xsize(7) ysize(4)
				
* uncomment to export figure		
*  graph export "pcsespenddiffr.pdf", replace
				
	
********************************************************************************

** Table A5 - LRMD with PCSE

********************************************************************************

eststo clear
eststo: xtpcse F5.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth , ///
	c(ar1) pairwise rhotype(tscorr)
eststo: xtpcse F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth , ///
	c(ar1) pairwise rhotype(tscorr)
eststo: xtpcse F5.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.autocracy#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth , ///
	c(ar1) pairwise rhotype(tscorr)
eststo: xtpcse F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth , ///
	c(ar1) pairwise rhotype(tscorr)
	
esttab, ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_g Countries") sfmt(0 0 2) ///
 nomtitle collabels(none) compress ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")		
	
/* Uncomment to export to LaTex 	
esttab _all using "psce_mat_mort5.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_g Countries") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")		
*/	
	
********************************************************************************

** Figure A13 - Marginal effects on LRMD (logged), PCSE

********************************************************************************
	
	
** restore Model 4
est restore est4

* average marginal effects by regime type
est restore est4
margins i.atype, dydx(v2lgfemleg) post coeflegend
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:2.atype] 
	test _b[v2lgfemleg:1.atype] = _b[v2lgfemleg:2.atype]
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:1.atype] 
	
marginsplot, level(90) recast(scatter) ///
	plotopts(mcolor(white) mlcolor(black) m(O)) ///
	xscale(r(-0.5 2.5)) ylab(-0.02(0.01)0.02, labsize(large)) ///
	xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
	xti("") yti("") ///
	yline(0, lcolor(black)) ti("") xsize(5) ysize(3) graphregion(color(white)) ///
	ciopts(lcolor(black) lwidth(medium))
	
* uncomment to export figure	
* graph export "pcse_mat_mort5_ave.pdf", replace

** plot predicted marginal effects and 90% CIs 
est restore est4
margins, dydx(i.atype) at(v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(color(black) lwidth(medium)) level(90) ///
			ylab(0.8(0.2)-0.8,labsize(medium)) ///
			xlab(0(10)50,labsize(medium)) ///
				xsize(7) ysize(4) graphregion(color(white))
			
* uncoment to export figure	
* graph export "pcse_mar_mort5_marg.pdf", replace	
	
********************************************************************************

** Table A6: IHME Estimates for Government Spending 1995-2019
 
********************************************************************************

eststo clear
eststo: xtreg ghes_per_gdp_mean L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.quota L.e_gdppc L.lpop L.v2pehealth, fe cluster(country_id)
eststo: xtreg ghes_per_gdp_mean L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.quota L.e_gdppc L.lpop L.v2pehealth, fe cluster(country_id)
eststo: xtreg ghes_per_gdp_mean L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.autocracy#L.c.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth, ///
	fe cluster(country_id)
eststo: xtreg ghes_per_gdp_mean L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.atype#c.L.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth, ///
	fe cluster(country_id)
	
esttab, ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress ///
 order(L.v2lgfemleg 1L.autocracy 1L.atype 2L.atype ///
	1L.autocracy#cL.v2lgfemleg  ///
	1L.atype#cL.v2lgfemleg  ///
	2L.atype#cL.v2lgfemleg  ///
	1L.quota 1L.femex ///
	L.e_gdppc L.lpop L.v2pehealth _cons) ///
 drop(0bL.autocracy* 0bL.atype* 0bL.quota 0bL.femex) ///
 coeflabel(1L.autocracy "Autocracy" ///
	2L.atype "Electoral autocracy" ///
	1L.atype "Closed autocracy" ///
	1L.autocracy#cL.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L.atype#cL.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1L.atype#cL.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1L.femex "Woman executive" ///
	L.v2lgfemleg "Women legislators (\%)" ///
	1L.quota "Gender quotas" ///
	L.e_gdppc "GDP (per capita)" ///
	L.lpop "Population (ln)" ///
	L.v2pehealth "Health equality" ///
	_cons "Constant")	


/* Uncomment to export to LaTex 
esttab _all using "Tables/ihme.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(L.v2lgfemleg 1L.autocracy 1L.atype 2L.atype ///
	1L.autocracy#cL.v2lgfemleg  ///
	1L.atype#cL.v2lgfemleg  ///
	2L.atype#cL.v2lgfemleg  ///
	1L.quota 1L.femex ///
	L.e_gdppc L.lpop L.v2pehealth _cons) ///
 drop(0bL.autocracy* 0bL.atype* 0bL.quota 0bL.femex) ///
 coeflabel(1L.autocracy "Autocracy" ///
	2L.atype "Electoral autocracy" ///
	1L.atype "Closed autocracy" ///
	1L.autocracy#cL.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L.atype#cL.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1L.atype#cL.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1L.femex "Woman executive" ///
	L.v2lgfemleg "Women legislators (\%)" ///
	1L.quota "Gender quotas" ///
	L.e_gdppc "GDP (per capita)" ///
	L.lpop "Population (ln)" ///
	L.v2pehealth "Health equality" ///
	_cons "Constant")
*/

	
********************************************************************************

** Figure A14 - Marginal effects on healthcare spending using IHME

********************************************************************************
	 
	
	
* average marginal effects by regime type
est restore est4
margins iL.atype, dydx(L.v2lgfemleg) post
	
marginsplot, level(90) recast(scatter) ///
		plotopts(mcolor(white) mlcolor(black) m(O)) ///
		xscale(r(-0.5 2.5)) ylab(,labsize(large)) ///
		xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
		xti("") yti("", size(large)) ///
		yline(0, lcolor(black)) ti("") xsize(5) ysize(3) ///
		ciopts(lcolor(black) lwidth(medium))
		
* Uncomment to export figure		
* graph export "ihme_spendmer.pdf", replace
		 

** differences in predicted values by regime type
est restore est4 
margins, dydx(iL.atype) at(L.v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)", size(medium)) ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(lcolor(black) lwidth(medium)) level(90) ///
			ylab(-4(2)4,labsize(large)) xlab(0(10)50,labsize(large)) ///
				xsize(7) ysize(4)
				
* Uncomment to export figure		
* graph export "ihme_spenddiffr.pdf", replace	
	
		
********************************************************************************

**  Table A7:  Ward et al. estimates 1990-2019 **

********************************************************************************

eststo clear
eststo: xtreg F5.lnmatltr ghes_per_gdp_mean i.autocracy i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F5.lnmatltr ghes_per_gdp_mean i.atype i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F5.lnmatltr ghes_per_gdp_mean i.autocracy i.femex ///
	v2lgfemleg i.autocracy#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
eststo: xtreg F5.lnmatltr ghes_per_gdp_mean i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
	
	
esttab,  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress  ///
 order(ghes_per_gdp_mean v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(ghes_per_gdp_mean "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")	
	
/* Uncomment to export to LaTex 	
esttab _all using "ward.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(ghes_per_gdp_mean v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(ghes_per_gdp_mean "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")
*/	

		
	
********************************************************************************

** Figure A15 - Marginal effects on LRMD (logged) from Ward et al. 

********************************************************************************
	
	
** restore Model 4
est restore est4

* average marginal effects by regime type
est restore est4
margins i.atype, dydx(v2lgfemleg) post coeflegend
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:2.atype] 
	test _b[v2lgfemleg:1.atype] = _b[v2lgfemleg:2.atype]
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:1.atype] 
	
marginsplot, level(90) recast(scatter) ///
	plotopts(mcolor(white) mlcolor(black) m(O)) ///
	xscale(r(-0.5 2.5)) ylab(-0.02(0.01)0.02, labsize(large)) ///
	xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
	xti("") yti("") ///
	yline(0, lcolor(black)) ti("") xsize(5) ysize(3) graphregion(color(white)) ///
	ciopts(lcolor(black) lwidth(medium))
	
	
* uncomment to export figure	
* graph export "ward_mat_mort5_ave.pdf", replace

** plot predicted marginal effects and 90% CIs 
est restore est4
margins, dydx(i.atype) at(v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(color(black) lwidth(medium)) level(90) ///
			ylab(0.8(0.2)-0.8,labsize(medium)) ///
			xlab(0(10)50,labsize(medium)) ///
				xsize(7) ysize(4) graphregion(color(white))
			
	
* uncomment to export figure	
* graph export "Figures/ward_mar_mort5_marg.pdf", replace		


	
	
********************************************************************************

** Ward et al. estimates 1990-2019 sample constrained **
* Not reported *
********************************************************************************

xtreg F5.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
gen sam = e(sample)

	

eststo clear
eststo: xtreg F5.lnmatltr wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth if sam==1, fe cluster(country_id)
eststo: xtreg F5.lnmatltr wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth if sam==1, fe cluster(country_id)
eststo: xtreg F5.lnmatltr wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.autocracy#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth if sam==1, fe cluster(country_id)
eststo: xtreg F5.lnmatltr wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth if sam==1, fe cluster(country_id)
	


esttab ,  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress  ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")
	
	



	
********************************************************************************

** Table A8 - Health Spending w/ Corruption as a Control Variable
 
********************************************************************************

eststo clear
eststo: xtreg wdi_dgovhexp L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.quota L.e_gdppc L.lpop L.v2pehealth L.v2x_corr, fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.quota L.e_gdppc L.lpop L.v2pehealth L.v2x_corr, fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L.i.autocracy L.i.femex L.v2lgfemleg ///
	L.i.autocracy#L.c.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth ///
	L.v2x_corr, fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L.i.atype L.i.femex L.v2lgfemleg ///
	L.i.atype#c.L.v2lgfemleg L.i.quota L.e_gdppc L.lpop L.v2pehealth L.v2x_corr, ///
	fe cluster(country_id)

esttab,   ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress ///
 order(L.v2lgfemleg 1L.autocracy 1L.atype 2L.atype ///
	1L.autocracy#cL.v2lgfemleg  ///
	1L.atype#cL.v2lgfemleg  ///
	2L.atype#cL.v2lgfemleg  ///
	1L.quota 1L.femex ///
	L.e_gdppc L.lpop L.v2pehealth L.v2x_corr _cons) ///
 drop(0bL.autocracy* 0bL.atype* 0bL.quota 0bL.femex) ///
 coeflabel(1L.autocracy "Autocracy" ///
	2L.atype "Electoral autocracy" ///
	1L.atype "Closed autocracy" ///
	1L.autocracy#cL.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L.atype#cL.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1L.atype#cL.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1L.femex "Woman executive" ///
	L.v2lgfemleg "Women legislators (\%)" ///
	1L.quota "Gender quotas" ///
	L.e_gdppc "GDP (per capita)" ///
	L.lpop "Population (ln)" ///
	L.v2pehealth "Health equality" ///
	L.v2x_corr "Corruption index" ///
	_cons "Constant")
	
	
/* Uncomment to export LaTex 	
esttab _all using "Tables/fe_spend_corr.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(L.v2lgfemleg 1L.autocracy 1L.atype 2L.atype ///
	1L.autocracy#cL.v2lgfemleg  ///
	1L.atype#cL.v2lgfemleg  ///
	2L.atype#cL.v2lgfemleg  ///
	1L.quota 1L.femex ///
	L.e_gdppc L.lpop L.v2pehealth L.v2x_corr _cons) ///
 drop(0bL.autocracy* 0bL.atype* 0bL.quota 0bL.femex) ///
 coeflabel(1L.autocracy "Autocracy" ///
	2L.atype "Electoral autocracy" ///
	1L.atype "Closed autocracy" ///
	1L.autocracy#cL.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L.atype#cL.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1L.atype#cL.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1L.femex "Woman executive" ///
	L.v2lgfemleg "Women legislators (\%)" ///
	1L.quota "Gender quotas" ///
	L.e_gdppc "GDP (per capita)" ///
	L.lpop "Population (ln)" ///
	L.v2pehealth "Health equality" ///
	L.v2x_corr "Corruption index" ///
	_cons "Constant")
*/
 
********************************************************************************

** Figure A16 - Marginal effects on healthcare spending, corruption control

********************************************************************************
	 

* average marginal effects by regime type
est restore est4
margins iL.atype, dydx(L.v2lgfemleg) post
	
marginsplot, level(90) recast(scatter) ///
		plotopts(mcolor(white) mlcolor(black) m(O)) ///
		xscale(r(-0.5 2.5)) ylab(,labsize(large)) ///
		xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
		xti("") yti("", size(large)) ///
		yline(0, lcolor(black)) ti("") xsize(5) ysize(3) ///
		ciopts(lcolor(black) lwidth(medium))
		
* uncomment to export figure		
* graph export "fespendmer_corr.pdf", replace
		 

** differences in predicted values by regime type
est restore est4 
margins, dydx(iL.atype) at(L.v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)", size(medium)) ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(lcolor(black) lwidth(medium)) level(90) ///
			ylab(-4(2)4,labsize(large)) xlab(0(10)50,labsize(large)) ///
				xsize(7) ysize(4)
				
				
* uncomment to export figure		
* graph export "fespenddiffr_corr.pdf", replace
 
 
 
********************************************************************************

** Table 9 - LRMD by regime type with Corruption as a Control

********************************************************************************

eststo clear
eststo: xtreg F5.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth v2x_corr, fe cluster(country_id)
eststo: xtreg F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth v2x_corr, fe cluster(country_id)
eststo: xtreg F5.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.autocracy#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth v2x_corr, fe cluster(country_id)
eststo: xtreg F5.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth v2x_corr, fe cluster(country_id)
	
esttab,  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress  ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth v2x_corr _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	v2x_corr "Corruption index" ///
	_cons "Constant")	
	
/* Uncomment to export LateX	
esttab _all using "fe_matmort5_corr.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth v2x_corr _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	v2x_corr "Corruption index" ///
	_cons "Constant")	
*/	
	
********************************************************************************

** Figure A17 - Marginal effects on LRMD (logged), corruption as a control

********************************************************************************
	
	
** restore Model 4
est restore est4

* average marginal effects by regime type
est restore est4
margins i.atype, dydx(v2lgfemleg) post coeflegend
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:2.atype] 
	test _b[v2lgfemleg:1.atype] = _b[v2lgfemleg:2.atype]
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:1.atype] 
	
marginsplot, level(90) recast(scatter) ///
	plotopts(mcolor(white) mlcolor(black) m(O)) ///
	xscale(r(-0.5 2.5)) ylab(-0.02(0.01)0.02, labsize(large)) ///
	xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
	xti("") yti("") ///
	yline(0, lcolor(black)) ti("") xsize(5) ysize(3) graphregion(color(white)) ///
	ciopts(lcolor(black) lwidth(medium))

* uncomment to export figure		
* 	graph export "mat_mort5_ave_corr.pdf", replace

** plot predicted marginal effects and 90% CIs 
est restore est4
margins, dydx(i.atype) at(v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(color(black) lwidth(medium)) level(90) ///
			ylab(0.8(0.2)-0.8,labsize(medium)) ///
			xlab(0(10)50,labsize(medium)) ///
				xsize(7) ysize(4) graphregion(color(white))
			
	
* uncomment to export figure		
* graph export "mar_mort5_marg_corr.pdf", replace		



	
********************************************************************************

** Table A10 - LRMD by regime type with one year lag

********************************************************************************

eststo clear
eststo: xtreg F1.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F1.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F1.mat_mort wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.autocracy#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
eststo: xtreg F1.mat_mort wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
	
	
esttab, ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")		

/* Uncomment to export LateX
esttab _all using "fe_matmort.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")	
*/	
	
********************************************************************************

** Figure A18 - Marginal effects on LRMD (logged), one year lag

********************************************************************************
	
	
** restore Model 4
est restore est4

* average marginal effects by regime type
est restore est4
margins i.atype, dydx(v2lgfemleg) post coeflegend
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:2.atype] 
	test _b[v2lgfemleg:1.atype] = _b[v2lgfemleg:2.atype]
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:1.atype] 
	
marginsplot, level(90) recast(scatter) ///
	plotopts(mcolor(white) mlcolor(black) m(O)) ///
	xscale(r(-0.5 2.5)) ylab(-0.02(0.01)0.02, labsize(large)) ///
	xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
	xti("") yti("") ///
	yline(0, lcolor(black)) ti("") xsize(5) ysize(3) graphregion(color(white)) ///
	ciopts(lcolor(black) lwidth(medium))

* uncomment to export figure		
* graph export "mat_mort5_ave_l1.pdf", replace

** plot predicted marginal effects and 90% CIs 
est restore est4
margins, dydx(i.atype) at(v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(color(black) lwidth(medium)) level(90) ///
			ylab(0.8(0.2)-0.8,labsize(medium)) ///
			xlab(0(10)50,labsize(medium)) ///
				xsize(7) ysize(4) graphregion(color(white))
			
	
* uncomment to export figure		
* graph export "mar_mort5_marg_l1.pdf", replace		
		
********************************************************************************

** Table A11 - Logged MMR by regime type with five year lag

********************************************************************************

eststo clear
eststo: xtreg F5.lmmr wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F5.lmmr wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F5.lmmr wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.autocracy#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
eststo: xtreg F5.lmmr wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
	
	
esttab, ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress  ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")		
	
	
/* Uncomment to export LateX	
esttab _all using "fe_lmmr5.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")	
*/
	
********************************************************************************

** Figure A19 - Marginal effects on MMR (logged) 

********************************************************************************
	
	
** restore Model 4
est restore est4

* average marginal effects by regime type
est restore est4
margins i.atype, dydx(v2lgfemleg) post coeflegend
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:2.atype] 
	test _b[v2lgfemleg:1.atype] = _b[v2lgfemleg:2.atype]
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:1.atype] 
	
marginsplot, level(90) recast(scatter) ///
	plotopts(mcolor(white) mlcolor(black) m(O)) ///
	xscale(r(-0.5 2.5)) ylab(-0.02(0.01)0.02, labsize(large)) ///
	xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
	xti("") yti("") ///
	yline(0, lcolor(black)) ti("") xsize(5) ysize(3) graphregion(color(white)) ///
	ciopts(lcolor(black) lwidth(medium))

* uncomment to export figure		
* graph export "mmr_ave.pdf", replace

** plot predicted marginal effects and 90% CIs 
est restore est4
margins, dydx(i.atype) at(v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(color(black) lwidth(medium)) level(90) ///
			ylab(0.8(0.2)-0.8,labsize(medium)) ///
			xlab(0(10)50,labsize(medium)) ///
				xsize(7) ysize(4) graphregion(color(white))
			
	
* uncomment to export figure		
* graph export "mmr_marg.pdf", replace		
	
	
********************************************************************************

** Table A12 - Female life expectancy by regime type with five year lag

********************************************************************************

eststo clear
eststo: xtreg F5.wdi_lifexpf wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F5.wdi_lifexpf wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F5.wdi_lifexpf wdi_dgovhexp i.autocracy i.femex ///
	v2lgfemleg i.autocracy#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
eststo: xtreg F5.wdi_lifexpf wdi_dgovhexp i.atype i.femex ///
	v2lgfemleg i.atype#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
	
esttab, ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress  ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")	
	
	
/* Uncomment to export LateX	
esttab _all using "fe_lifeexp.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(wdi_dgovhexp v2lgfemleg 1.autocracy ///
	1.atype 2.atype  ///
	1.autocracy#c.v2lgfemleg  ///
	1.atype#c.v2lgfemleg  ///
	2.atype#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(0.autocracy* 0.atype* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	1.autocracy "Autocracy" ///
	2.atype "Electoral autocracy" ///
	1.atype "Closed autocracy" ///
	1.autocracy#c.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2.atype#c.v2lgfemleg "Electoral autocracy $\times$ Women legislators" ///
	1.atype#c.v2lgfemleg "Closed autocracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")	
*/		
	
********************************************************************************

** Figure A20 - Marginal effects on female life expectancy 

********************************************************************************
	
	
** restore Model 4
est restore est4

* average marginal effects by regime type
est restore est4
margins i.atype, dydx(v2lgfemleg) post coeflegend
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:2.atype] 
	test _b[v2lgfemleg:1.atype] = _b[v2lgfemleg:2.atype]
	test _b[v2lgfemleg:0bn.atype] = _b[v2lgfemleg:1.atype] 
	
marginsplot, level(90) recast(scatter) ///
	plotopts(mcolor(white) mlcolor(black) m(O)) ///
	xscale(r(-0.5 2.5)) ylab(, labsize(large)) ///
	xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
	xti("") yti("") ///
	yline(0, lcolor(black)) ti("") xsize(5) ysize(3) graphregion(color(white)) ///
	ciopts(lcolor(black) lwidth(medium))

* uncomment to export figure		
* graph export "fexp_ave.pdf", replace

** plot predicted marginal effects and 90% CIs 
est restore est4
margins, dydx(i.atype) at(v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(color(black) lwidth(medium)) level(90) ///
			ylab(,labsize(medium)) ///
			xlab(0(10)50,labsize(medium)) ///
				xsize(7) ysize(4) graphregion(color(white))
			
	
* uncomment to export figure		
* graph export "fexp_marg.pdf", replace	


********************************************************************************

** Table A13: Results with liberal and electoral democracies differentiated
 
********************************************************************************


eststo clear
eststo: xtreg F.wdi_dgovhexp ib3.v2x_regime i.femex v2lgfemleg ///
	i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F.wdi_dgovhexp ib3.v2x_regime i.femex v2lgfemleg ///
	ib3.v2x_regime#c.v2lgfemleg i.quota e_gdppc lpop v2pehealth, ///
	fe cluster(country_id)
	
eststo: xtreg F5.mat_mort wdi_dgovhexp ib3.v2x_regime i.femex ///
	v2lgfemleg i.quota e_gdppc lpop v2pehealth, fe cluster(country_id)
eststo: xtreg F5.mat_mort wdi_dgovhexp ib3.v2x_regime i.femex ///
	v2lgfemleg ib3.v2x_regime#c.v2lgfemleg i.quota e_gdppc lpop ///
	v2pehealth, fe cluster(country_id)
	
	
esttab, ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress ///
 order(wdi_dgovhexp v2lgfemleg 0.v2x_regime ///
	1.v2x_regime 2.v2x_regime  ///
	0.v2x_regime#c.v2lgfemleg  ///
	1.v2x_regime#c.v2lgfemleg  ///
	2.v2x_regime#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(3.v2x_regime* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	0.v2x_regime "Closed autocracy" ///
	1.v2x_regime "Electoral autocracy" ///
	2.v2x_regime "Electoral democracy" ///
	0.v2x_regime#c.v2lgfemleg ///
		"Closed autocracy $\times$ Women legislators" ///
	1.v2x_regime#c.v2lgfemleg ///
		"Electoral autocracy $\times$ Women legislators" ///
	2.v2x_regime#c.v2lgfemleg ///
		"Electoral democracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")	
	
/* Uncomment to export LateX
esttab _all using "libdem.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(wdi_dgovhexp v2lgfemleg 0.v2x_regime ///
	1.v2x_regime 2.v2x_regime  ///
	0.v2x_regime#c.v2lgfemleg  ///
	1.v2x_regime#c.v2lgfemleg  ///
	2.v2x_regime#c.v2lgfemleg  ///
	1.quota 1.femex ///
	e_gdppc lpop v2pehealth _cons) ///
	 drop(3.v2x_regime* 0.quota 0.femex) ///
 coeflabel(wdi_dgovhexp "Health expenditure (\%GDP)" ///
	0.v2x_regime "Closed autocracy" ///
	1.v2x_regime "Electoral autocracy" ///
	2.v2x_regime "Electoral democracy" ///
	0.v2x_regime#c.v2lgfemleg ///
		"Closed autocracy $\times$ Women legislators" ///
	1.v2x_regime#c.v2lgfemleg ///
		"Electoral autocracy $\times$ Women legislators" ///
	2.v2x_regime#c.v2lgfemleg ///
		"Electoral democracy $\times$ Women legislators" ///
	1.femex "Woman executive" ///
	v2lgfemleg "Women legislators (\%)" ///
	1.quota "Gender quotas" ///
	e_gdppc "GDP (per capita)" ///
	lpop "Population (ln)" ///
	v2pehealth "Health equality" ///
	_cons "Constant")
*/	
	
********************************************************************************

** Figure A21 - Marginal effects of liberal versus electoral democracies, government spending

********************************************************************************
	
	

est restore est2

* average marginal effects by regime type
est restore est2
margins i.v2x_regime, dydx(v2lgfemleg) post coeflegend

	
marginsplot, level(90) recast(scatter) ///
	plotopts(mcolor(white) mlcolor(black) m(O)) ///
	xscale(r(-0.5 3.5)) ylab(, labsize(large)) ///
	xlab(0 `""Closed" "autocracy""' 1 `""Electoral" "autocracy""' ///
			2  `""Electoral" "democracy""'3  `""Liberal" "democracy""', ///
			labsize(large)) ///
	xti("") yti("") ///
	yline(0, lcolor(black)) ti("") xsize(5) ysize(3) ///
	graphregion(color(white)) ///
	ciopts(lcolor(black) lwidth(medium))

* uncomment to export figure		
* graph export "libdem1.pdf", replace

** plot predicted marginal effects and 90% CIs 
est restore est2
margins, dydx(i.v2x_regime) at(v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) ///
			lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy" ///
			3 "Electoral democracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(color(black) lwidth(medium)) level(90) ///
			ylab(,labsize(medium)) ///
			xlab(0(10)50,labsize(medium)) ///
				xsize(7) ysize(4) graphregion(color(white))

* uncomment to export figure		
* graph export "libdem2.pdf", replace	
	
	
********************************************************************************

** Figure A22 - Marginal effects of liberal versus electoral democracies, LRMD

********************************************************************************
	
		
	
est restore est4 
	* average marginal effects by regime type
margins i.v2x_regime, dydx(v2lgfemleg) post coeflegend

	
marginsplot, level(90) recast(scatter) ///
	plotopts(mcolor(white) mlcolor(black) m(O)) ///
	xscale(r(-0.5 3.5)) ylab(, labsize(large)) ///
	xlab(0 `""Closed" "autocracy""' 1 `""Electoral" "autocracy""' ///
			2  `""Electoral" "democracy""'3  `""Liberal" "democracy""', ///
			labsize(large)) ///
	xti("") yti("") ///
	yline(0, lcolor(black)) ti("") xsize(5) ysize(3) ///
	graphregion(color(white)) ///
	ciopts(lcolor(black) lwidth(medium))

* uncomment to export figure		
* graph export "libdem3.pdf", replace

** plot predicted marginal effects and 90% CIs 
est restore est4
margins, dydx(i.v2x_regime) at(v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)") ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) ///
			lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy" ///
			3 "Electoral democracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(color(black) lwidth(medium)) level(90) ///
			ylab(,labsize(medium)) ///
			xlab(0(10)50,labsize(medium)) ///
				xsize(7) ysize(4) graphregion(color(white))

* uncomment to export figure		
* graph export "libdem4.pdf", replace	



********************************************************************************

** Table A14 - Health expenditures with two year lag
 
********************************************************************************

eststo clear
eststo: xtreg wdi_dgovhexp L2.i.autocracy L2.i.femex L2.v2lgfemleg ///
	L2.i.quota L2.e_gdppc L2.lpop L2.v2pehealth, fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L2.i.atype L2.i.femex L2.v2lgfemleg ///
	L2.i.quota L2.e_gdppc L2.lpop L2.v2pehealth, fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L2.i.autocracy L2.i.femex L2.v2lgfemleg ///
	L2.i.autocracy#L2.c.v2lgfemleg L2.i.quota L2.e_gdppc ///
	L2.lpop L2.v2pehealth, fe cluster(country_id)
eststo: xtreg wdi_dgovhexp L2.i.atype L2.i.femex L2.v2lgfemleg ///
	L2.i.atype#c.L2.v2lgfemleg L2.i.quota L2.e_gdppc L2.lpop L2.v2pehealth, ///
	fe cluster(country_id)
	
	
esttab, ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress ///
 order(L2.v2lgfemleg 1L2.autocracy 1L2.atype 2L2.atype ///
	1L2.autocracy#cL2.v2lgfemleg  ///
	1L2.atype#cL2.v2lgfemleg  ///
	2L2.atype#cL2.v2lgfemleg  ///
	1L2.quota 1L2.femex ///
	L2.e_gdppc L2.lpop L2.v2pehealth _cons) ///
 drop(0bL2.autocracy* 0bL2.atype* 0bL2.quota 0bL2.femex) ///
 coeflabel(1L2.autocracy "Autocracy" ///
	2L2.atype "Electoral autocracy" ///
	1L2.atype "Closed autocracy" ///
	1L2.autocracy#cL2.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L2.atype#cL2.v2lgfemleg ///
		"Electoral autocracy $\times$ Women legislators" ///
	1L2.atype#cL2.v2lgfemleg ///
		"Closed autocracy $\times$ Women legislators" ///
	1L2.femex "Woman executive" ///
	L2.v2lgfemleg "Women legislators (\%)" ///
	1L2.quota "Gender quotas" ///
	L2.e_gdppc "GDP (per capita)" ///
	L2.lpop "Population (ln)" ///
	L2.v2pehealth "Health equality" ///
	_cons "Constant")	

/* Uncomment to export LateX
esttab _all using "fe_spend2.tex", replace f  ///
 b(2) se(2) label star(* 0.10 ** 0.05 *** 0.01)  ///
 scalars( "N" "N_clust Countries" "aic AIC" "bic BIC") sfmt(0 0 2) ///
 nomtitle collabels(none) compress booktabs alignment(D{.}{.}{-1}) ///
 order(L2.v2lgfemleg 1L2.autocracy 1L2.atype 2L2.atype ///
	1L2.autocracy#cL2.v2lgfemleg  ///
	1L2.atype#cL2.v2lgfemleg  ///
	2L2.atype#cL2.v2lgfemleg  ///
	1L2.quota 1L2.femex ///
	L2.e_gdppc L2.lpop L2.v2pehealth _cons) ///
 drop(0bL2.autocracy* 0bL2.atype* 0bL2.quota 0bL2.femex) ///
 coeflabel(1L2.autocracy "Autocracy" ///
	2L2.atype "Electoral autocracy" ///
	1L2.atype "Closed autocracy" ///
	1L2.autocracy#cL2.v2lgfemleg "Autocracy $\times$ Women legislators" ///
	2L2.atype#cL2.v2lgfemleg ///
		"Electoral autocracy $\times$ Women legislators" ///
	1L2.atype#cL2.v2lgfemleg ///
		"Closed autocracy $\times$ Women legislators" ///
	1L2.femex "Woman executive" ///
	L2.v2lgfemleg "Women legislators (\%)" ///
	1L2.quota "Gender quotas" ///
	L2.e_gdppc "GDP (per capita)" ///
	L2.lpop "Population (ln)" ///
	L2.v2pehealth "Health equality" ///
	_cons "Constant")
*/
 
********************************************************************************

** Figure A23 - Healthcare spending, two year lag

********************************************************************************
	 
	
	
* average marginal effects by regime type
est restore est4
margins iL2.atype, dydx(L2.v2lgfemleg) post
	
marginsplot, level(90) recast(scatter) ///
		plotopts(mcolor(white) mlcolor(black) m(O)) ///
		xscale(r(-0.5 2.5)) ylab(,labsize(large)) ///
		xlab(1 `""Closed" "autocracy""' 2 `""Electoral" "autocracy""' ///
			0 "Democracy", labsize(large)) ///
		xti("") yti("", size(large)) ///
		yline(0, lcolor(black)) ti("") xsize(5) ysize(3) ///
		ciopts(lcolor(black) lwidth(medium))

* uncomment to export figure		
* graph export "fespendmer2.pdf", replace
		 

** differences in predicted values by regime type
est restore est4 
margins, dydx(iL2.atype) at(L2.v2lgfemleg=(0(10)50)) 
marginsplot, yti("") ///
		xti("Women legislators (%)", size(medium)) ti("") yline(0, lcolor(black)) ///
		recast(connected) recastci(rspike) ///
		plotopts(mcolor(white) mlcolor(black) m(O) lcolor(black) lwidth(medium)) ///
		by(_deriv, elabel(1 "Closed autocracy" 2 "Electoral autocracy")) ///
		byoptions(rows(1) ti("")) ///
		ciopts(lcolor(black) lwidth(medium)) level(90) ///
			ylab(-4(2)4,labsize(large)) xlab(0(10)50,labsize(large)) ///
				xsize(7) ysize(4)
				
* uncomment to export figure		
* graph export "fespenddiffr2.pdf", replace
